<template>
  <div>
    <component :is="item.keyName" v-for="(item, index) in listHome" :key="index"></component>
  </div>
</template>

<script>
import { getHomeList } from "@/api/common";
export default {
  data() {
    return {
      listHome: [],
    };
  },
  mounted() {
    this.getHomeListFun();
  },
  methods: {
    getHomeListFun() {
      this.invoke(getHomeList).then((res) => {
        if (res && res.code == 200) {
          const list = res.data;
          this.listHome = list;
          this.$nextTick(() => {
            if (process.browser) {
              new WOW({
                live: false,
                offset: 50,
                mobile: true, // 是否在移动设备上执行动画
                animateClass: "animate__animated",
              }).init();
            }
          });
        }
      });
    },
  },
};
</script>
